package com.ruoyi.web.controller.datastatistics;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.datastatistics.service.ITerminalsMonfreezeDbService;
import com.ruoyi.web.convert.terminalsMonfreezeDb.TerminalsMonfreezeDbConvert;
import com.ruoyi.web.entity.FreezeMonth2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 大表月用量数据Controller
 *
 * @author ruoyi
 * @date 2023-09-07
 */
@RestController
@RequestMapping("/api/RealtimeDataStatistic")
public class TerminalsMonfreezeDbController extends BaseController
{
    @Autowired
    private ITerminalsMonfreezeDbService terminalsMonfreezeDbService;

    /**
     * 查询大表月用量数据列表
     */
    @GetMapping("/DataAnalysisTerminalsMoreDataList4")
    public TableDataInfo list(@RequestParam(value = "TerminalID",required = false)String TerminalID,
                              @RequestParam(value = "startTime",required = false)String startTime,
                              @RequestParam(value = "endTime",required = false)String endTime)
    {
        startPage();
        List<FreezeMonth2> list = TerminalsMonfreezeDbConvert.INSTANCE.convert(terminalsMonfreezeDbService.selectTerminalsMonfreezeDbLists(TerminalID,startTime,
                endTime));
        return getDataTable(list);
    }


}
